package io.renren.modules.generator.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.generator.dao.LeaveMessageDao;
import io.renren.modules.generator.entity.LeaveMessageEntity;
import io.renren.modules.generator.service.LeaveMessageService;


@Service("leaveMessageService")
public class LeaveMessageServiceImpl extends ServiceImpl<LeaveMessageDao, LeaveMessageEntity> implements LeaveMessageService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<LeaveMessageEntity> page = this.page(
                new Query<LeaveMessageEntity>().getPage(params),
                new QueryWrapper<LeaveMessageEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public IPage<Map<String, Object>> selectComment(Page<Map<String, Object>> page, Map<String, Object> params) {
        return baseMapper.selectComment(page, params);
    }

}
